using System;
using System.Runtime.Serialization;

namespace LibreriaCommon
{
	public class CryptoException : Exception
	{
		public CryptoException() : base()
		{
            ErrorLog.Log(this);
		}

		public CryptoException(Exception ex) : base(ex.Message)
		{
            ErrorLog.Log(ex);
		}

		public CryptoException(string message) : base(message)
		{
            ErrorLog.Log(this);
		}
		
		public CryptoException(string message, Exception inner) : base(message, inner)
		{
            ErrorLog.Log(inner);
		}

        protected CryptoException(SerializationInfo info, StreamingContext context) : base(info, context)
		{
            ErrorLog.Log(this);
		}
	}
}
